package logic.common.team.processes;

import networking.messages.teamMessages.ProcessCreateMessage;
import fileHandling.language.Lang;
import fileHandling.language.interfaces.HUDText;
import logic.common.team.Team;
import logic.ships.frigate.Frigate;

public class FrigateProcess extends TeamProcess {
	
	public FrigateProcess(Team team) {
		super(team, FRIGATE_TIME);
	}
	
	@Override
	public void finish() {
		Frigate frigate = team.addNewFrigate();
		frigate.getLocalTranslation().set(team.getMotherShip().getRandomFrigateSpawn(frigate));
		team.getIngameState().addNode(frigate);
	}
	
	@Override
	public Lang getDescription() { return HUDText.Frigate; }
	
	@Override
	public ProcessCreateMessage getProcessCreateMessage() {
		return new ProcessCreateMessage(team.getFraction(), getID(), ProcessType.Frigate);
	}
}